package org.fatmansoft.teach.models;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.*;
import java.util.Set;

@Entity
@Data
@EqualsAndHashCode(exclude = {"students"})
@Table(	name = "social_activity",
        uniqueConstraints = {
        })
public class SocialActivity {
     @Id
     private Integer socialActivityId;

    @ToString.Exclude
    private String socialActivityName;

    private String socialActivityType;

    private String socialActivityTime;

    private String socialActivityLocation;

    private String volunteerTime;

    @ManyToMany(mappedBy = "socialActivities", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
    @ToString.Exclude
    private Set<Student> students;












}
